/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package utility.statistik;

import java.awt.Color;
import java.util.Random;

/**
 *
 * @author Jeppe
 */
public class StatistikData {

    private String title;
    private int value;
    private Color color;
    

    protected StatistikData(String title, int value) {
        if (title == null) {
            this.title = "Default";
        } else {
            this.title = title;
        }
        this.value = value;
        Random ran = new Random();
        int r = ran.nextInt(255);
        int g = ran.nextInt(255);
        int b = ran.nextInt(255);
        this.color = new Color(r, g, b);
    }

    public StatistikData(String title, int value, Color color) {
        if (title == null) {
            this.title = "Default";
        } else {
            this.title = title;
        }
        this.value = value;
        this.color = color;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public int getValue() {
        return value;
    }

    public void setValue(int value) {
        this.value = value;
    }

    public Color getColor() {
        return color;
    }

    public void setColor(Color color) {
        this.color = color;
    }
    
    @Override
    public String toString(){
        return title + " = "+value;
    }

}
